3.1.56 \(\int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx\) [56]

3.1.56.1 Optimal result
3.1.56.2 Mathematica [C] (verified)
3.1.56.3 Rubi [A] (verified)
3.1.56.4 Maple [B] (verified)
3.1.56.5 Fricas [A] (verification not implemented)
3.1.56.6 Sympy [F]
3.1.56.7 Maxima [F(-1)]
3.1.56.8 Giac [F]
3.1.56.9 Mupad [F(-1)]

3.1.56.1 Optimal result

Integrand size = 28, antiderivative size = 172 \[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\frac {2 a^{3/2} \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{c^4 f}+\frac {2 a \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{c^4 f}-\frac {2 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 c^4 f}+\frac {2 \cot ^5(e+f x) (a+a \sec (e+f x))^{5/2}}{5 a c^4 f}-\frac {4 \cot ^7(e+f x) (a+a \sec (e+f x))^{7/2}}{7 a^2 c^4 f} \]

output
2*a^(3/2)*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/c^4/f-2/3*cot( 
f*x+e)^3*(a+a*sec(f*x+e))^(3/2)/c^4/f+2/5*cot(f*x+e)^5*(a+a*sec(f*x+e))^(5 
/2)/a/c^4/f-4/7*cot(f*x+e)^7*(a+a*sec(f*x+e))^(7/2)/a^2/c^4/f+2*a*cot(f*x+ 
e)*(a+a*sec(f*x+e))^(1/2)/c^4/f
 
3.1.56.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 4.60 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.42 \[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\frac {2 a^2 \left (-10+7 \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},1-\sec (e+f x)\right ) (-1+\sec (e+f x))\right ) \tan (e+f x)}{35 c^4 f (-1+\sec (e+f x))^4 \sqrt {a (1+\sec (e+f x))}} \]

input
Integrate[(a + a*Sec[e + f*x])^(3/2)/(c - c*Sec[e + f*x])^4,x]
 
output
(2*a^2*(-10 + 7*Hypergeometric2F1[-5/2, 1, -3/2, 1 - Sec[e + f*x]]*(-1 + S 
ec[e + f*x]))*Tan[e + f*x])/(35*c^4*f*(-1 + Sec[e + f*x])^4*Sqrt[a*(1 + Se 
c[e + f*x])])
 
3.1.56.3 Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.91, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {3042, 4392, 3042, 4375, 359, 264, 264, 264, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a \sec (e+f x)+a)^{3/2}}{(c-c \sec (e+f x))^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{3/2}}{\left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4}dx\)

\(\Big \downarrow \) 4392

\(\displaystyle \frac {\int \cot ^8(e+f x) (\sec (e+f x) a+a)^{11/2}dx}{a^4 c^4}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{11/2}}{\cot \left (e+f x+\frac {\pi }{2}\right )^8}dx}{a^4 c^4}\)

\(\Big \downarrow \) 4375

\(\displaystyle -\frac {2 \int \frac {\cot ^8(e+f x) (\sec (e+f x) a+a)^4 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{a^2 c^4 f}\)

\(\Big \downarrow \) 359

\(\displaystyle -\frac {2 \left (\frac {2}{7} \cot ^7(e+f x) (a \sec (e+f x)+a)^{7/2}-a \int \frac {\cot ^6(e+f x) (\sec (e+f x) a+a)^3}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )}{a^2 c^4 f}\)

\(\Big \downarrow \) 264

\(\displaystyle -\frac {2 \left (\frac {2}{7} \cot ^7(e+f x) (a \sec (e+f x)+a)^{7/2}-a \left (\frac {1}{5} \cot ^5(e+f x) (a \sec (e+f x)+a)^{5/2}-a \int \frac {\cot ^4(e+f x) (\sec (e+f x) a+a)^2}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )}{a^2 c^4 f}\)

\(\Big \downarrow \) 264

\(\displaystyle -\frac {2 \left (\frac {2}{7} \cot ^7(e+f x) (a \sec (e+f x)+a)^{7/2}-a \left (\frac {1}{5} \cot ^5(e+f x) (a \sec (e+f x)+a)^{5/2}-a \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \int \frac {\cot ^2(e+f x) (\sec (e+f x) a+a)}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )\right )}{a^2 c^4 f}\)

\(\Big \downarrow \) 264

\(\displaystyle -\frac {2 \left (\frac {2}{7} \cot ^7(e+f x) (a \sec (e+f x)+a)^{7/2}-a \left (\frac {1}{5} \cot ^5(e+f x) (a \sec (e+f x)+a)^{5/2}-a \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \left (\cot (e+f x) \sqrt {a \sec (e+f x)+a}-a \int \frac {1}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )\right )\right )}{a^2 c^4 f}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {2 \left (\frac {2}{7} \cot ^7(e+f x) (a \sec (e+f x)+a)^{7/2}-a \left (\frac {1}{5} \cot ^5(e+f x) (a \sec (e+f x)+a)^{5/2}-a \left (\frac {1}{3} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-a \left (\sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )+\cot (e+f x) \sqrt {a \sec (e+f x)+a}\right )\right )\right )\right )}{a^2 c^4 f}\)

input
Int[(a + a*Sec[e + f*x])^(3/2)/(c - c*Sec[e + f*x])^4,x]
 
output
(-2*((2*Cot[e + f*x]^7*(a + a*Sec[e + f*x])^(7/2))/7 - a*((Cot[e + f*x]^5* 
(a + a*Sec[e + f*x])^(5/2))/5 - a*((Cot[e + f*x]^3*(a + a*Sec[e + f*x])^(3 
/2))/3 - a*(Sqrt[a]*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]] 
] + Cot[e + f*x]*Sqrt[a + a*Sec[e + f*x]])))))/(a^2*c^4*f)
 

3.1.56.3.1 Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 264
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^( 
m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] - Simp[b*((m + 2*p + 3)/(a*c 
^2*(m + 1)))   Int[(c*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, p 
}, x] && LtQ[m, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
 

rule 359
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x 
_Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + 
Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)* 
(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] 
&& LtQ[m, -1] &&  !ILtQ[p, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 

rule 4392
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( 
d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m   Int[Cot[e + f*x]^(2*m)*( 
c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E 
qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !( 
IntegerQ[n] && GtQ[m - n, 0])
 
3.1.56.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(348\) vs. \(2(152)=304\).

Time = 2.46 (sec) , antiderivative size = 349, normalized size of antiderivative = 2.03

method result size
default \(\frac {2 a \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (105 \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \cos \left (f x +e \right )^{3}-315 \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \cos \left (f x +e \right )^{2}+191 \cos \left (f x +e \right )^{3} \cot \left (f x +e \right )+315 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )-406 \cos \left (f x +e \right )^{2} \cot \left (f x +e \right )-105 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+350 \cos \left (f x +e \right ) \cot \left (f x +e \right )-105 \cot \left (f x +e \right )\right )}{105 c^{4} f \left (\cos \left (f x +e \right )-1\right )^{3}}\) \(349\)

input
int((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e))^4,x,method=_RETURNVERBOSE)
 
output
2/105/c^4/f*a*(a*(sec(f*x+e)+1))^(1/2)/(cos(f*x+e)-1)^3*(105*(-cos(f*x+e)/ 
(cos(f*x+e)+1))^(1/2)*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/(cos( 
f*x+e)+1))^(1/2))*cos(f*x+e)^3-315*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*arct 
anh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2))*cos(f*x+ 
e)^2+191*cos(f*x+e)^3*cot(f*x+e)+315*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-c 
os(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*cos(f* 
x+e)-406*cos(f*x+e)^2*cot(f*x+e)-105*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-c 
os(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+350*co 
s(f*x+e)*cot(f*x+e)-105*cot(f*x+e))
 
3.1.56.5 Fricas [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 495, normalized size of antiderivative = 2.88 \[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\left [\frac {105 \, {\left (a \cos \left (f x + e\right )^{3} - 3 \, a \cos \left (f x + e\right )^{2} + 3 \, a \cos \left (f x + e\right ) - a\right )} \sqrt {-a} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} - 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, {\left (191 \, a \cos \left (f x + e\right )^{4} - 406 \, a \cos \left (f x + e\right )^{3} + 350 \, a \cos \left (f x + e\right )^{2} - 105 \, a \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{210 \, {\left (c^{4} f \cos \left (f x + e\right )^{3} - 3 \, c^{4} f \cos \left (f x + e\right )^{2} + 3 \, c^{4} f \cos \left (f x + e\right ) - c^{4} f\right )} \sin \left (f x + e\right )}, \frac {105 \, {\left (a \cos \left (f x + e\right )^{3} - 3 \, a \cos \left (f x + e\right )^{2} + 3 \, a \cos \left (f x + e\right ) - a\right )} \sqrt {a} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (191 \, a \cos \left (f x + e\right )^{4} - 406 \, a \cos \left (f x + e\right )^{3} + 350 \, a \cos \left (f x + e\right )^{2} - 105 \, a \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{105 \, {\left (c^{4} f \cos \left (f x + e\right )^{3} - 3 \, c^{4} f \cos \left (f x + e\right )^{2} + 3 \, c^{4} f \cos \left (f x + e\right ) - c^{4} f\right )} \sin \left (f x + e\right )}\right ] \]

input
integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e))^4,x, algorithm="fricas")
 
output
[1/210*(105*(a*cos(f*x + e)^3 - 3*a*cos(f*x + e)^2 + 3*a*cos(f*x + e) - a) 
*sqrt(-a)*log(-(8*a*cos(f*x + e)^3 - 4*(2*cos(f*x + e)^2 - cos(f*x + e))*s 
qrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e) - 7*a*cos(f*x 
 + e) + a)/(cos(f*x + e) + 1))*sin(f*x + e) + 4*(191*a*cos(f*x + e)^4 - 40 
6*a*cos(f*x + e)^3 + 350*a*cos(f*x + e)^2 - 105*a*cos(f*x + e))*sqrt((a*co 
s(f*x + e) + a)/cos(f*x + e)))/((c^4*f*cos(f*x + e)^3 - 3*c^4*f*cos(f*x + 
e)^2 + 3*c^4*f*cos(f*x + e) - c^4*f)*sin(f*x + e)), 1/105*(105*(a*cos(f*x 
+ e)^3 - 3*a*cos(f*x + e)^2 + 3*a*cos(f*x + e) - a)*sqrt(a)*arctan(2*sqrt( 
a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e)/(2*a* 
cos(f*x + e)^2 + a*cos(f*x + e) - a))*sin(f*x + e) + 2*(191*a*cos(f*x + e) 
^4 - 406*a*cos(f*x + e)^3 + 350*a*cos(f*x + e)^2 - 105*a*cos(f*x + e))*sqr 
t((a*cos(f*x + e) + a)/cos(f*x + e)))/((c^4*f*cos(f*x + e)^3 - 3*c^4*f*cos 
(f*x + e)^2 + 3*c^4*f*cos(f*x + e) - c^4*f)*sin(f*x + e))]
 
3.1.56.6 Sympy [F]

\[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\frac {\int \frac {a \sqrt {a \sec {\left (e + f x \right )} + a}}{\sec ^{4}{\left (e + f x \right )} - 4 \sec ^{3}{\left (e + f x \right )} + 6 \sec ^{2}{\left (e + f x \right )} - 4 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {a \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}}{\sec ^{4}{\left (e + f x \right )} - 4 \sec ^{3}{\left (e + f x \right )} + 6 \sec ^{2}{\left (e + f x \right )} - 4 \sec {\left (e + f x \right )} + 1}\, dx}{c^{4}} \]

input
integrate((a+a*sec(f*x+e))**(3/2)/(c-c*sec(f*x+e))**4,x)
 
output
(Integral(a*sqrt(a*sec(e + f*x) + a)/(sec(e + f*x)**4 - 4*sec(e + f*x)**3 
+ 6*sec(e + f*x)**2 - 4*sec(e + f*x) + 1), x) + Integral(a*sqrt(a*sec(e + 
f*x) + a)*sec(e + f*x)/(sec(e + f*x)**4 - 4*sec(e + f*x)**3 + 6*sec(e + f* 
x)**2 - 4*sec(e + f*x) + 1), x))/c**4
 
3.1.56.7 Maxima [F(-1)]

Timed out. \[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\text {Timed out} \]

input
integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e))^4,x, algorithm="maxima")
 
output
Timed out
 
3.1.56.8 Giac [F]

\[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\int { \frac {{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}}}{{\left (c \sec \left (f x + e\right ) - c\right )}^{4}} \,d x } \]

input
integrate((a+a*sec(f*x+e))^(3/2)/(c-c*sec(f*x+e))^4,x, algorithm="giac")
 
output
sage0*x
 
3.1.56.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(a+a \sec (e+f x))^{3/2}}{(c-c \sec (e+f x))^4} \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}}{{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^4} \,d x \]

input
int((a + a/cos(e + f*x))^(3/2)/(c - c/cos(e + f*x))^4,x)
 
output
int((a + a/cos(e + f*x))^(3/2)/(c - c/cos(e + f*x))^4, x)